package com.settlement.system.service;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblWpAuditCloseAccount;
import org.springframework.cache.annotation.Cacheable;

import java.util.Date;
import java.util.List;

/**
 * 唯品稽核关账设置 服务类
 *
 * @author xiaochuan
 * @since 2020-11-19
 */

public interface ITblWpAuditCloseAccountService extends IBaseService {

    /**
     * 通过店铺编码获取锁帐数据
     *
     * @param shopNo
     * @return
     * @throws ServiceException
     */
    @Cacheable("wpAccountByShopNo")
    TblWpAuditCloseAccount getByShopNo(String shopNo) throws ServiceException;

    /**
     * getMaxInitialDateByShopNo
     * @param shopNo
     * @return
     * @throws ServiceException
     */
    Date getMaxInitialDateByShopNo(String shopNo) throws ServiceException;

    /**
     * 批量关账
     *
     * @param ids
     * @param realCloseAccountDate
     * @return
     * @throws ServiceException
     */
    public void closeAccount(List<String> ids, Date realCloseAccountDate) throws ServiceException;

    /**
     * 通过id 获取关账日
     *
     * @param id
     * @return
     * @throws ServiceException
     */
    public TblWpAuditCloseAccount getById(String id) throws ServiceException;

    /**
     * 删除关账日
     *
     * @param closeAccount
     * @throws ServiceException
     */
    public void deleteClose(TblWpAuditCloseAccount closeAccount) throws ServiceException;
}

